package com.power.sifa.respond.dao;

import com.power.sifa.respond.model.Apl_plaintiff;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.Repository;
import org.springframework.data.repository.query.Param;

import javax.transaction.Transactional;
import java.io.Serializable;
import java.util.List;

/**
 * 原告 持久层(hibernate)
 */

public interface Apl_plaintiffDao extends JpaRepository<Apl_plaintiff, Serializable>, JpaSpecificationExecutor<Apl_plaintiff>, Repository<Apl_plaintiff, Serializable>, Apl_plaintiffDaoCustom<Apl_plaintiff, Serializable> {

   @Modifying
   @Transactional
   @Query("delete  from Apl_plaintiff s where  s.id in (:ids) ")
   void removeByIds(@Param("ids") List<Integer> ids);
}
